Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Jul 9, 2025


PR-Codex overview

This PR focuses on refactoring the billing and chain management functionalities in the dashboard application. It removes unused code and simplifies components, enhancing readability and maintainability.

Detailed summary

  • Removed getGasSponsoredChains function and its usage.
  • Simplified CreditsInfoCard to remove unnecessary props.
  • Eliminated GasCreditAlert component.
  • Refactored CreditsItem to reduce props and improve clarity.
  • Adjusted API calls in page.tsx to remove unused getAuthToken.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Refactor
    • Simplified the billing credits display by removing special handling and application UI for "Optimism sponsorship credits".
    • Streamlined the CreditsInfoCard component to reduce dependencies and remove special credit handling.
    • Removed logic and UI related to gas-sponsored chains and gas sponsorship call-to-actions.
    • Deleted the GasCreditAlert component and its alert UI from the account abstraction page.
    • Reduced authentication and client dependencies in the billing page for improved simplicity.

@vercel vercel bot temporarily deployed to Preview – wallet-ui July 9, 2025 00:18 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 9, 2025 00:18 Inactive
@vercel
Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2025 3:08am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Jul 10, 2025 3:08am
nebula ⬜️ Skipped (Inspect) Jul 10, 2025 3:08am
thirdweb_playground ⬜️ Skipped (Inspect) Jul 10, 2025 3:08am
wallet-ui ⬜️ Skipped (Inspect) Jul 10, 2025 3:08am

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 9, 2025 00:18 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 July 9, 2025 00:18 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Jul 9, 2025

⚠️ No Changeset found

Latest commit: a3cdc9e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 9, 2025

Walkthrough

The changes remove all logic and UI related to gas sponsorship and Optimism-specific credits from the codebase. This includes deleting API calls, special UI components, and conditional logic for gas-sponsored chains and credits. Components and utility functions are simplified to exclude authentication, thirdweb client dependencies, and all gas sponsorship handling.

Changes

File(s) Change Summary
apps/dashboard/src/@/api/chain.ts Removed getGasSponsoredChains function and related secret import.
apps/dashboard/src/@/components/billing/CreditsItem.tsx Simplified props and logic; removed all Optimism sponsorship credit handling and related UI.
apps/dashboard/src/@/components/billing/PlanCard.tsx Removed external props and Optimism credit handling; simplified to only render non-OP credits.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/utils.ts Removed gas sponsorship logic, imports, and CTA; now only returns static chain metadata.
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/page.tsx Removed thirdweb client and auth token logic; simplified CreditsInfoCard usage to require no props.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionPage.tsx Removed GasCreditAlert component and related imports; no longer displays gas sponsorship alerts.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CreditsInfoCard
    participant useAccountCredits

    User->>CreditsInfoCard: Render
    CreditsInfoCard->>useAccountCredits: Fetch credits
    useAccountCredits-->>CreditsInfoCard: Return credits
    CreditsInfoCard->>User: Display filtered credits (no OP/gas sponsorship logic)
Loading
sequenceDiagram
    participant User
    participant getChainMetadata

    User->>getChainMetadata: Request chain metadata (with chainId)
    getChainMetadata-->>User: Return static metadata (no gas sponsorship logic)
Loading

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 581cdda and a3cdc9e.

📒 Files selected for processing (6)
  • apps/dashboard/src/@/api/chain.ts (0 hunks)
  • apps/dashboard/src/@/components/billing/CreditsItem.tsx (2 hunks)
  • apps/dashboard/src/@/components/billing/PlanCard.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/utils.ts (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionPage.tsx (0 hunks)
💤 Files with no reviewable changes (2)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/account-abstraction/AccountAbstractionPage.tsx
  • apps/dashboard/src/@/api/chain.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/utils.ts
  • apps/dashboard/src/@/components/billing/CreditsItem.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/page.tsx
  • apps/dashboard/src/@/components/billing/PlanCard.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MananTank MananTank marked this pull request as ready for review July 9, 2025 00:18
@MananTank MananTank requested review from a team as code owners July 9, 2025 00:18
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Jul 9, 2025
Copy link
Member Author

MananTank commented Jul 9, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.49%. Comparing base (5c6dd87) to head (581cdda).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7569   +/-   ##
=======================================
  Coverage   56.49%   56.49%           
=======================================
  Files         906      906           
  Lines       58028    58028           
  Branches     4226     4226           
=======================================
  Hits        32783    32783           
  Misses      25137    25137           
  Partials      108      108           
Flag Coverage Δ
packages 56.49% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.17 KB (0%) 1.3 s (0%) 200 ms (+157.2% 🔺) 1.5 s
thirdweb (cjs) 353.22 KB (0%) 7.1 s (0%) 649 ms (+8.49% 🔺) 7.8 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 63 ms (+1497.45% 🔺) 177 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 15 ms (+761.76% 🔺) 25 ms
thirdweb/react (minimal + tree-shaking) 19.58 KB (0%) 392 ms (0%) 51 ms (+418.67% 🔺) 443 ms

@graphite-app
Copy link
Contributor

graphite-app bot commented Jul 10, 2025

Merge activity

  • Jul 10, 2:51 AM UTC: MananTank added this pull request to the Graphite merge queue.
  • Jul 10, 3:05 AM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Unit Tests').

graphite-app bot pushed a commit that referenced this pull request Jul 10, 2025
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the code in various files by removing unused imports, simplifying components, and eliminating the `getGasSponsoredChains` function. It also streamlines the `CreditsInfoCard` and `CreditsItem` components, enhancing clarity and functionality.

### Detailed summary
- Removed the `getGasSponsoredChains` function from `chain.ts`.
- Simplified `CreditsInfoCard` component by removing props and directly using `useAccountCredits`.
- Updated `CreditsItem` component to remove unused props and functionality related to OP credits.
- Eliminated `GasCreditAlert` from `AccountAbstractionLayout`.
- Adjusted imports in `utils.ts` to exclude `getGasSponsoredChains`.
- Removed temporary OP_CTA definition from `utils.ts`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Refactor**
  * Simplified the billing credits display by removing special handling and application UI for "Optimism sponsorship credits".
  * Streamlined the CreditsInfoCard component to reduce dependencies and remove special credit handling.
  * Removed logic and UI related to gas-sponsored chains and gas sponsorship call-to-actions.
  * Deleted the GasCreditAlert component and its alert UI from the account abstraction page.
  * Reduced authentication and client dependencies in the billing page for improved simplicity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 07-09-dashboard_remove_op_superchain_banner_ctas_credits branch from 9b53461 to 581cdda Compare July 10, 2025 02:51
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 10, 2025 02:52 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 10, 2025 02:52 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 July 10, 2025 02:52 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 10, 2025 02:52 Inactive
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the code by removing unnecessary imports and simplifying components, particularly in the billing and chain management sections. It also eliminates unused functions and optimizes the handling of credits.

### Detailed summary
- Removed `getGasSponsoredChains` function and its usage.
- Simplified `CreditsInfoCard` by removing props and using `useAccountCredits`.
- Removed `GasCreditAlert` component and its references.
- Cleaned up `CreditsItem` by removing unnecessary props and logic.
- Removed unused imports in various files, improving code clarity.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **Refactor**
  * Simplified the billing credits display by removing special handling and application UI for "Optimism sponsorship credits".
  * Streamlined the CreditsInfoCard component to reduce dependencies and remove special credit handling.
  * Removed logic and UI related to gas-sponsored chains and gas sponsorship call-to-actions.
  * Deleted the GasCreditAlert component and its alert UI from the account abstraction page.
  * Reduced authentication and client dependencies in the billing page for improved simplicity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 07-09-dashboard_remove_op_superchain_banner_ctas_credits branch from 581cdda to a3cdc9e Compare July 10, 2025 03:00
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 10, 2025 03:00 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 10, 2025 03:00 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 10, 2025 03:00 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 July 10, 2025 03:00 Inactive
@jnsdls jnsdls merged commit 826d9c8 into main Jul 10, 2025
20 of 21 checks passed
@jnsdls jnsdls deleted the 07-09-dashboard_remove_op_superchain_banner_ctas_credits branch July 10, 2025 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants